/******************************************************************************
/
/  Authors:
/           Ilan Bar-Magen    061220380  silanm@t2 
/    		Shalev Mintz      066078189  shalevmi@t2  
/
/  Submition date: 6/8/2008
/
/  This file contains: Implementaion as required in assignment specs
/
/
******************************************************************************/

#ifndef EUROPOPE_H 
#define EUROPOPE_H

#include "DSL.h"
#include "UF.h"
//#include "library2.h"

#include<cstdlib>  // for NULL
#include<iostream>

using namespace std;

class EuroPope{
private:
	const int citizens_num;
	DRSkip_List<int,int,int> TownsDRSL; 
	UF<int*> CitizensUF;

	bool getTownWealth(const int town, int& wealth);
public:
	EuroPope(const int citizens, const int defaultSalary): 
			citizens_num(citizens), TownsDRSL(INT_MAX, INT_MIN), CitizensUF(citizens) 
			{	for(int i=0;i<citizens;i++)
				{	TownsDRSL.Insert_Node(i,defaultSalary);
					CitizensUF.SetData(i,&(TownsDRSL.Data_By_Key(i)));
				}													
			}
	~EuroPope() {};  
	StatusType attack(int town1, int town2);
	StatusType getTown(int id, int* townId);
	StatusType getPopeTax(int town, int* tax);
	StatusType changePopeTax(int townFrom, int townTo, int additionalTax); 
	StatusType changeSalary(int town, int newSalary);
};

#endif //EUROPOPE_H
